import requests
from apis.basepage import Basepage
from common.config import ip

# 登录
class Login(Basepage):
        def login(self,):
                logindata = {"username": "admin","password":"123456"}
                c1=requests.post(f"{ip}/login",data=logindata)
                # token = c1.json()["Admin-Token"]
                # return c1
                return c1
        # def loginOk(self):
        #         logindata = {"username": "admin", "password": "123456"}
        #         self.c1 = requests.post(f"{ip}/login", data=logindata)
        #         a = self.c1.json()["code"]
        #         return a
        # def loginErr(self):
        #         logindata = {"username": "admi", "password": "12345"}
        #         self.c1 = requests.post(f"{ip}/login", data=logindata)
        #         a = self.c1.json()["code"]
        #         return a

# if __name__ == '__main__':
